/*
 * ArrayOrdened.h
 *
 *  Created on: 21/01/2012
 *      Author: marcio
 */

#ifndef ARRAYORDENED_H_
#define ARRAYORDENED_H_

#include <stdio.h>
#include <stdlib.h>

typedef struct a{
	void** elem;
	long size;
	int (*compare)(void*, void*);
} ArrayOrdened;

ArrayOrdened* arrayordened_newArray(long size, int (*function)(void*, void*));

void* arrayordened_getElem(ArrayOrdened* a, long i);

int arrayordened_putElem(ArrayOrdened* a, void* newElem);

int arrayordened_isEmpty(ArrayOrdened* a);

int arrayordened_searchFor(ArrayOrdened* a, void* elem);

int arrayordened_delete(ArrayOrdened* a);

#endif /* ARRAYORDENED_H_ */
